



/*
-----------------------------------------------------------------------------
Filename:    ODEInitializeDynamics.cpp
Description: This is the ODEInterface implementation of the initializeDynamics method
specified in ODEInterface.h.
//-\|/-\|-\|/-\|-\|/-\|-\|/-\|-\|/-\|/-//
Sections occuring between two of these lines need to be restructured to accommodate access
from another GraphcisInterface funciton.
//-\|/-\|-\|/-\|-\|/-\|-\|/-\|-\|/-\|/-//
-----------------------------------------------------------------------------
*/


#include <ode.h>
#include "ODEInterface.h"


ODEInterface::ODEInterface() {  //Empty Constructor
}

bool ODEInterface::initializeDynamics () {

    //Create a world
    dInitODE();
    world = dWorldCreate();
    space = dHashSpaceCreate (0);

    //Set the world's gravity value
    this->setGravity( (float)9.8 );

    dWorldSetQuickStepNumIterations ( world, 64 );




    return true;
}


void ODEInterface::setGravity ( float gravity ) {


    dWorldSetGravity ( world, 0, 0, gravity );

}











